<html>
<head><meta charset="utf-8"><title>playground miri redeploy · t-lang/wg-unsafe-code-guidelines · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/index.html">t-lang/wg-unsafe-code-guidelines</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html">playground miri redeploy</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="147807031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147807031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147807031">(Nov 16 2018 at 09:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> Could I get you to trigger a redeploy of miri on the playground? That would make it fetch an update that I'd like to be deployed when publishing a certain blog post. ;)</p>



<a name="147819755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147819755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147819755">(Nov 16 2018 at 14:27)</a>:</h4>
<p>done</p>



<a name="147819767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147819767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147819767">(Nov 16 2018 at 14:27)</a>:</h4>
<p>well, check the version yourself; I pushed the buttons</p>



<a name="147823013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147823013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147823013">(Nov 16 2018 at 15:22)</a>:</h4>
<p>commit number looks identical to master, thanks &lt;3</p>



<a name="147890709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147890709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147890709">(Nov 17 2018 at 20:42)</a>:</h4>
<p>Where's the blog post <span class="user-mention" data-user-id="120791">@RalfJ</span> ?</p>



<a name="147890716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147890716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147890716">(Nov 17 2018 at 20:43)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> <a href="https://www.ralfj.de/blog/2018/11/16/stacked-borrows-implementation.html" target="_blank" title="https://www.ralfj.de/blog/2018/11/16/stacked-borrows-implementation.html">https://www.ralfj.de/blog/2018/11/16/stacked-borrows-implementation.html</a></p>



<a name="147890717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147890717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147890717">(Nov 17 2018 at 20:43)</a>:</h4>
<p>been on IRLO and reddit since yesterday :)</p>



<a name="147891223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147891223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147891223">(Nov 17 2018 at 21:01)</a>:</h4>
<p>I try to mostly stay away from r/rust and I'm not doing enough internals development to hang out on IRLO.</p>



<a name="147891224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147891224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147891224">(Nov 17 2018 at 21:02)</a>:</h4>
<p>I just knew you had mentioned the blog post in regards to the update so I figured I'd see what's what.</p>



<a name="147891378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147891378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147891378">(Nov 17 2018 at 21:06)</a>:</h4>
<blockquote>
<p>The amazing @shepmaster has integrated miri into the playground</p>
</blockquote>
<p>Aww <span class="emoji emoji-2764" title="heart">:heart:</span></p>



<a name="147895645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147895645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147895645">(Nov 17 2018 at 23:46)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span>  Excellent post that one. <span class="emoji emoji-261d" title="wait one second">:wait_one_second:</span>️ I will have to go over it again to fully wrap my head around it. Do you have a list of PRs that made the model possible ?</p>



<a name="147895929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147895929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147895929">(Nov 17 2018 at 23:57)</a>:</h4>
<p>Also, rustc does not incorporate miri at this point right ? What's the plan on integrating it ?</p>



<a name="147909179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147909179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147909179">(Nov 18 2018 at 08:14)</a>:</h4>
<blockquote>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span>  Excellent post that one. <span class="emoji emoji-261d" title="wait one second">:wait_one_second:</span>️ I will have to go over it again to fully wrap my head around it. Do you have a list of PRs that made the model possible ?</p>
</blockquote>
<p>I guess on the rustc side that would be<br>
<a href="https://github.com/rust-lang/rust/pull/54461" target="_blank" title="https://github.com/rust-lang/rust/pull/54461">https://github.com/rust-lang/rust/pull/54461</a><br>
<a href="https://github.com/rust-lang/rust/pull/54762" target="_blank" title="https://github.com/rust-lang/rust/pull/54762">https://github.com/rust-lang/rust/pull/54762</a><br>
<a href="https://github.com/rust-lang/rust/pull/54955" target="_blank" title="https://github.com/rust-lang/rust/pull/54955">https://github.com/rust-lang/rust/pull/54955</a><br>
<a href="https://github.com/rust-lang/rust/pull/55125" target="_blank" title="https://github.com/rust-lang/rust/pull/55125">https://github.com/rust-lang/rust/pull/55125</a><br>
<a href="https://github.com/rust-lang/rust/pull/55270" target="_blank" title="https://github.com/rust-lang/rust/pull/55270">https://github.com/rust-lang/rust/pull/55270</a><br>
<a href="https://github.com/rust-lang/rust/pull/55316" target="_blank" title="https://github.com/rust-lang/rust/pull/55316">https://github.com/rust-lang/rust/pull/55316</a><br>
<a href="https://github.com/rust-lang/rust/pull/55549" target="_blank" title="https://github.com/rust-lang/rust/pull/55549">https://github.com/rust-lang/rust/pull/55549</a><br>
<a href="https://github.com/rust-lang/rust/pull/55716" target="_blank" title="https://github.com/rust-lang/rust/pull/55716">https://github.com/rust-lang/rust/pull/55716</a><br>
and <a href="https://github.com/rust-lang/rust/pull/55916" target="_blank" title="https://github.com/rust-lang/rust/pull/55916">https://github.com/rust-lang/rust/pull/55916</a> still waits to land</p>
<p>and on the miri side<br>
<a href="https://github.com/solson/miri/pull/468" target="_blank" title="https://github.com/solson/miri/pull/468">https://github.com/solson/miri/pull/468</a><br>
<a href="https://github.com/solson/miri/pull/473" target="_blank" title="https://github.com/solson/miri/pull/473">https://github.com/solson/miri/pull/473</a><br>
<a href="https://github.com/solson/miri/pull/474" target="_blank" title="https://github.com/solson/miri/pull/474">https://github.com/solson/miri/pull/474</a><br>
<a href="https://github.com/solson/miri/pull/477" target="_blank" title="https://github.com/solson/miri/pull/477">https://github.com/solson/miri/pull/477</a><br>
<a href="https://github.com/solson/miri/pull/487" target="_blank" title="https://github.com/solson/miri/pull/487">https://github.com/solson/miri/pull/487</a><br>
<a href="https://github.com/solson/miri/pull/492" target="_blank" title="https://github.com/solson/miri/pull/492">https://github.com/solson/miri/pull/492</a><br>
<a href="https://github.com/solson/miri/pull/506" target="_blank" title="https://github.com/solson/miri/pull/506">https://github.com/solson/miri/pull/506</a><br>
<a href="https://github.com/solson/miri/pull/513" target="_blank" title="https://github.com/solson/miri/pull/513">https://github.com/solson/miri/pull/513</a><br>
<a href="https://github.com/solson/miri/pull/524" target="_blank" title="https://github.com/solson/miri/pull/524">https://github.com/solson/miri/pull/524</a><br>
and <a href="https://github.com/solson/miri/pull/526" target="_blank" title="https://github.com/solson/miri/pull/526">https://github.com/solson/miri/pull/526</a> still waits to land</p>



<a name="147909191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147909191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147909191">(Nov 18 2018 at 08:14)</a>:</h4>
<blockquote>
<p>Also, rustc does not incorporate miri at this point right ? What's the plan on integrating it ?</p>
</blockquote>
<p>rustc uses the miri engine for CTFE. but CTFE does not implement stacked borrows. I am not sure if there are any plans to change that -- this stuff comes with a significant performance cost.</p>



<a name="147921972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147921972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147921972">(Nov 18 2018 at 16:19)</a>:</h4>
<p>Thanks a lot for all the info and the PR list<br>
Even if not in rustc directly, but stacked borrow gives people a way to verify unsafe rust. And that's a great step forward. So thank you for that. <span class="user-mention" data-user-id="120791">@RalfJ</span></p>



<a name="147983271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147983271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147983271">(Nov 19 2018 at 18:15)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> so i just finished a chat with niko about NLL which touched on your stacked model. It came up that creating a raw ptr from an &amp;mut makes <em>all</em> raw ptrs allowed to access the &amp;mut's memory -- is that true even if it's dead code?</p>



<a name="147983310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147983310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147983310">(Nov 19 2018 at 18:16)</a>:</h4>
<p>e.g.</p>



<a name="147983336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147983336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147983336">(Nov 19 2018 at 18:16)</a>:</h4>
<div class="codehilite"><pre><span></span>mut_ref as *mut _;
*other_aliasing_ptr += 1;
</pre></div>



<a name="147984563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147984563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147984563">(Nov 19 2018 at 18:39)</a>:</h4>
<p>examples: <a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=e2a61d03963423a824292b287f842fb6" target="_blank" title="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=e2a61d03963423a824292b287f842fb6">https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=e2a61d03963423a824292b287f842fb6</a></p>



<a name="147984781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147984781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147984781">(Nov 19 2018 at 18:42)</a>:</h4>
<blockquote>
<p>is that true even if it's dead code?</p>
</blockquote>
<p>No. This is completely a dynamic model, think of an instrumented execution, if a statement is not executed it has no effect.</p>
<p>But you seem to have a different definition of dead code, if I look at your example... it does <em>not</em> matter whether the result of the cast is used. It <em>does</em> matter whether the cast is executed.</p>



<a name="147984812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147984812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147984812">(Nov 19 2018 at 18:43)</a>:</h4>
<p>I think this is a property (flaw?) inherent in all models that make casts have side-effects: You cannot remove them even if the result is unused.</p>



<a name="147984831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147984831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147984831">(Nov 19 2018 at 18:43)</a>:</h4>
<p>And I doubt it is possible to get an access-based model for rust references where casts are side-effect-free.</p>



<a name="147984930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147984930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147984930">(Nov 19 2018 at 18:44)</a>:</h4>
<p><span class="user-mention" data-user-id="137587">@Gankro</span> also see <a href="https://internals.rust-lang.org/t/types-as-contracts/5562/113?u=ralfjung" target="_blank" title="https://internals.rust-lang.org/t/types-as-contracts/5562/113?u=ralfjung">https://internals.rust-lang.org/t/types-as-contracts/5562/113?u=ralfjung</a></p>



<a name="147985049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985049">(Nov 19 2018 at 18:46)</a>:</h4>
<p>yeah by "dead" I mean "otherwise pure code that could be compiled out of the final binary"</p>



<a name="147985053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985053">(Nov 19 2018 at 18:46)</a>:</h4>
<p>though the funny thing is that <code>is_ub_1012A</code> is actually not UB in my model... <span class="user-mention" data-user-id="116009">@nikomatsakis</span> should it be? It is no more UB since I made <code>[T]::iter_mut</code> work</p>



<a name="147985072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985072">(Nov 19 2018 at 18:46)</a>:</h4>
<blockquote>
<p>yeah by "dead" I mean "otherwise pure code that could be compiled out of the final binary"</p>
</blockquote>
<p>escape-to-raw is not pure code :D</p>



<a name="147985085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985085">(Nov 19 2018 at 18:46)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> also you still haven't posted that blog post yet, eh?</p>



<a name="147985108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985108">(Nov 19 2018 at 18:46)</a>:</h4>
<p>in the MIR this is explicit. the cast has no side-effect, it is pure, but the escape-to-raw statement that got emitted next to it is not pure</p>



<a name="147985121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985121">(Nov 19 2018 at 18:47)</a>:</h4>
<p>I have, even posted the here in the very topic we are talking in^^</p>



<a name="147985134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985134">(Nov 19 2018 at 18:47)</a>:</h4>
<p><span class="user-mention" data-user-id="137587">@Gankro</span>  <a href="https://www.ralfj.de/blog/2018/11/16/stacked-borrows-implementation.html" target="_blank" title="https://www.ralfj.de/blog/2018/11/16/stacked-borrows-implementation.html">https://www.ralfj.de/blog/2018/11/16/stacked-borrows-implementation.html</a></p>



<a name="147985137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985137">(Nov 19 2018 at 18:47)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> ah, I checked your blog's index, which lacks it :)</p>



<a name="147985145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985145">(Nov 19 2018 at 18:47)</a>:</h4>
<p>or, wait</p>



<a name="147985152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985152">(Nov 19 2018 at 18:48)</a>:</h4>
<p>uh, no? <a href="https://www.ralfj.de/blog/" target="_blank" title="https://www.ralfj.de/blog/">https://www.ralfj.de/blog/</a></p>



<a name="147985192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985192">(Nov 19 2018 at 18:48)</a>:</h4>
<p>it's on <a href="https://www.ralfj.de/blog/feed.xml" target="_blank" title="https://www.ralfj.de/blog/feed.xml">https://www.ralfj.de/blog/feed.xml</a> as well</p>



<a name="147985198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985198">(Nov 19 2018 at 18:48)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> oh I followed links and ended up on <a href="https://www.ralfj.de/blog/categories/research.html" target="_blank" title="https://www.ralfj.de/blog/categories/research.html">https://www.ralfj.de/blog/categories/research.html</a></p>



<a name="147985199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985199">(Nov 19 2018 at 18:48)</a>:</h4>
<p><em>shrug</em></p>



<a name="147985217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985217">(Nov 19 2018 at 18:48)</a>:</h4>
<p>ah^^</p>



<a name="147985230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985230">(Nov 19 2018 at 18:49)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> so is the playground I linked correct?</p>



<a name="147985235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985235">(Nov 19 2018 at 18:49)</a>:</h4>
<p>yeah it's in the Rust category but not in Research... dunno, Research is MPI stuff^^</p>



<a name="147985356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985356">(Nov 19 2018 at 18:50)</a>:</h4>
<p>hm seems like the edition switch isnt propagated to miri, <code>example1</code> dosn't compile</p>



<a name="147985471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985471">(Nov 19 2018 at 18:52)</a>:</h4>
<p><span class="user-mention" data-user-id="137587">@Gankro</span> yes that looks all right, and if you run it in miri it agrees^^</p>



<a name="147985478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985478">(Nov 19 2018 at 18:52)</a>:</h4>
<p>sweet</p>



<a name="147985479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985479">(Nov 19 2018 at 18:52)</a>:</h4>
<p>it points out exactly the two lines you marked UB</p>



<a name="147985488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985488">(Nov 19 2018 at 18:52)</a>:</h4>
<p>and I'll need to ask <span class="user-mention" data-user-id="116155">@Jake Goulding</span> about the edition</p>



<a name="147985517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985517">(Nov 19 2018 at 18:53)</a>:</h4>
<blockquote>
<p>where only the top of the stack is the valid path</p>
</blockquote>
<p><span class="user-mention" data-user-id="137587">@Gankro</span> that's not correct or at least not how I'd put it. Every item on the stack is valid to use. But using one invalidates everything further up the stack.</p>



<a name="147985530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985530">(Nov 19 2018 at 18:54)</a>:</h4>
<p>Sure</p>



<a name="147985577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gankra <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985577">(Nov 19 2018 at 18:54)</a>:</h4>
<p>I handled that by suggesting accessing A "pops" everything above it implicitly</p>



<a name="147985612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985612">(Nov 19 2018 at 18:54)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> If I'm reading correctly, You are saying that setting the edition to 2018 doesn't affect running Miri? Mind filing an issue if so?</p>



<a name="147985626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985626">(Nov 19 2018 at 18:55)</a>:</h4>
<p>I wonder how rustfmt and clippy handle the edition...</p>



<a name="147985638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985638">(Nov 19 2018 at 18:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> I was literally filing the issue while you posted :) <a href="https://github.com/integer32llc/rust-playground/issues/429" target="_blank" title="https://github.com/integer32llc/rust-playground/issues/429">https://github.com/integer32llc/rust-playground/issues/429</a></p>



<a name="147985703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985703">(Nov 19 2018 at 18:56)</a>:</h4>
<blockquote>
<p>I wonder how rustfmt and clippy handle the edition...</p>
</blockquote>
<p>clippy on playground has the same problem</p>



<a name="147985726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985726">(Nov 19 2018 at 18:57)</a>:</h4>
<p>when using miri directly I think you just have to pass <code>--edition</code></p>



<a name="147985739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985739">(Nov 19 2018 at 18:57)</a>:</h4>
<p>I guess <code>cargo miri</code> should do that based on what it says in the <code>Cargo.toml</code>?</p>



<a name="147985747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground%20miri%20redeploy/near/147985747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/playground.20miri.20redeploy.html#147985747">(Nov 19 2018 at 18:57)</a>:</h4>
<p>I wonder if cargo provides a nice API for that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>